var express = require('express')
var bodyParser = require('body-parser');

var app = express();

var routes = require('./routes');

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({exrended:true}));
app.engine('.html',require('ejs').renderFile);
app.set('view engine','html');

app.use('/api',routes);

app.use(function(req,res) {
	res.render('404');
});

var PORT = 9990

var server = app.listen(PORT,function onListen() {
	console.log('SERVER STARTED');
});
